package com.hebeu.card.sys.service.impl.user;

import java.util.List;

import com.hebeu.card.sys.dao.user.UserDao;
import com.hebeu.card.sys.entity.user.User;
import com.hebeu.card.sys.service.user.IUserService;

public class UserServiceImpl implements IUserService<User>{
	UserDao userDao;

	public UserServiceImpl() {
		userDao = new UserDao();
	}

	@Override
	public User get(int id) {
		return userDao.get(id);
	}

	@Override
	public List<User> getAll() {
		return userDao.getAll();
	}

	@Override
	public List<User> getList(String hql) {
		//from User u where u.id = 10;
		//select * from user where id = 10
		return userDao.getList(hql);
	}

	@Override
	public void save(User entity) {
		userDao.save(entity);
	}

	@Override
	public void delete(int id) {
		userDao.deleteById(id);
	}

	@Override
	public void search(String hql) {
		
	}

}
